//引入路由
// import Home from '@/views/Home'

// // import Detail from '@/views/Detail'

// import Login from '@/views/Login'
// import Register from '@/views/Register'
// import Seach from '@/views/Seach'

 const routes=[
  { path: '/', redirect: '/home' },
  // Home页面
  {
    path: '/home',
    component: () => import('@/views/Home'),
    // children: [
    //   {
    //     path: 'typeNav', component: TypeNav,
    //   }
    // ]
  },
  
  {
    path: '/login',
    component: () => import('@/views/Login'),
    // 用来控制当前组件头尾显示不
    meta:{
        isHiddenFooter:true
    }
  },
  {
    path: '/register',
    component: () => import('@/views/Register'),
    meta:{
      isHiddenFooter:true
  }
  },
  
  {
    
    name: 'search',
    path: '/search/:keyword?',

    component: () => import('@/views/Seach'),
    meta: {
      isHiddenNav:true
    }
    
  },

  //添加detarl路由
  {
    name: 'detail',
    path: '/detail/:id',
    component: () => import('@/views/Detail'),
    meta: {
      isHiddenNav:true
    },
    props:true
   },
  //添加AddCartSuccess路由
  {
    name: 'AddCartSuccess',
    path: '/AddCartSuccess/',
    component: () => import('@/views/AddCartSuccess'),
  
  },
  //添加购物车结算路由
  {
    name: 'ShopCart',
    path: '/ShopCart/',
    component: () => import('@/views/ShopCart'),
  
   },
  //添加注册页面路由
  {
    name: 'Register',
    path: '/Register/',
    component: () => import('@/views/Register'),
  
   },
  //添加结算等路由
  {
    name: '/Trade',
    path: '/Trade/',
    component: () => import('@/views//Trade'),
  
   },
  {
    name: '/Pay',
    path: '/Pay/',
    component: () => import('@/views/Pay'),
  
   },
  {
    name: 'PaySuccess',
    path: '/PaySuccess/',
    component: () => import('@/views/PaySuccess'),
  
   },
  {
    name: 'Center',
    path: '/Center/',
    component: () => import('@/views/Center'),
  
   },

]
export default routes